import pygame

class BasePlane(object):
  def __init__(self, screen, x, y, imageUrl):
    self.x = x
    self.y = y
    self.screen = screen
    self.image = pygame.image.load(imageUrl)
    self.bulletList = []

  def display(self):
    self.screen.blit(self.image, (self.x, self.y))
    for bullet in self.bulletList:
      bullet.display()
      bullet.move()
      if bullet.judge(): # 判断子弹是否越界
        self.bulletList.remove(bullet)